package demo;

import java.util.Scanner;

public class Test
{
    public static void main(String[] args)
    {
        GoldCard gc = new GoldCard("川BQC882", "赵", "182819609960", 5000);
        SliverCard sc = new SliverCard("川A88888","顾","158922568554",2000);
        pay(gc);
        pay(sc);
    }

    public static void pay(Card c)
    {
        System.out.println("请刷卡,输入消费金额:");
        Scanner sc = new Scanner(System.in);
        double money = sc.nextDouble();
        c.consume(money);
    }
}
